home *** CD-ROM | disk | FTP | other *** search
- /*
- $VER: Notify User [Arexx script] V0.41 (02-02-98) © Copex - aWo
-
- Bug Reports ect to -: copex@online.u-net.com
- Uppdates/Bugfixes :- http:www.online.u-net.com/updates/
-
- NOTE -: This Rexx Script is now EMAIL Ware, If you Use it You SHOULD Email
- Me ......*/
-
- player = 'RUN <>NIL: C:Play16'
- soundfileC = 'Internet:amicom/NTFC.SND'
- soundfileD = 'Internet:amicom/NTFD.SND'
- PlaySonud = 'Yes'
-
- user.0 = 'Po'
- user.1 = 'LaLa'
- user.2 = 'Tinky Winky'
- user.3 = 'Dispy'
- user.4 = 'TellyTubbies'
- user.5 = 'NoOne'
-
- NumberOfUsers = 5
-
- ShowReqC = 'yes'
- ShowReqD = 'yes'
- UseAmirc = 'yes'
-
- UseGeatz = 'yes'
-
- NoGreatzTo = 'Tibb Copex hparting' /* NEW - See Docs */
-
- Greatings.0 = 'Hi there %n^ It^s Good to see you again'
- Greatings.1 = 'Hello %n^ how are you today'
- Greatings.2 = 'Hello %n^ are you haveing a good day'
- Greatings.3 = 'Hello %n'
-
- Gsk = 'Yes' /* SEE DOCS */
- NumberOfGretz = 3
-
- pubscr = ''
- ReqType = 'ACS' /* ACS = Use Amicomsys Requestor - REQT Use Reqtools Lib */
-
- /* Do Not Tuch Any Code Below Here Unless You Know What You Are Doing .... */
-
- ADDRESS AMICOMSYS
- OPTIONS RESULTS
-
- NL = '0a'x; QU = '22'x
-
- IF ~SHOW('LIBRARIES','rexxreqtools.library') THEN
- IF ~ADDLIB('rexxreqtools.library',0,-30,0) THEN EXIT(10)
-
- tags='rt_reqpos=reqpos_centerwin' 'rtez_defaultresponse=0'
- if pubscr ~= '' then 'rt_pubscrname='||pubscr
-
- parse arg usr host action
- act = upper(action)
-
- GET stem info. CLIENTLIST
-
- If usr = info.login then exit
-
- select
- when act = 'CON' then call Connecting
- when act = 'DIS' then call Disconnecting
- when act = 'UPD' then exit
- otherwise Exit
- end
-
- Exit
-
- /* ------------------------------------------------------------ */
- Connecting:
- am = 0; G = 0; USRGT = 'Y'
- seen = checkuser()
-
- if seen = 1 then do
-
- if pp ~= 0 & upper(UseGeatz) = 'YES' then do
-
- R = random('0',NumberOfGretz,time(s))
- Greatings = Greatings.R
- pp = pos('%n',Greatings)
- ndx = index(Greatings,'%n')
- if ndx ~=0 then do
- st = substr(Greatings,1,ndx - 1)
- if ndx+2 ~> length(Greatings) then nd = substr(Greatings,ndx+2,length(Greatings)-ndx)
- else nd = ' '
- Greatings = st||usr||nd
- Greatings = translate(Greatings,,"^","'")
- end
- end
-
- sound = Player ||" "|| SoundfileC
- if upper(UseAmirc) = 'YES' then am = amirc('Connected')
- If upper(PlaySonud) = "YES" Then address command sound
- info = "_[_User_Name_]_-:_"||usr||NL||"_[_Host_]_-:_"||host
- If upper(ShowReqC) = 'YES' & am = 0 then r = req(info' ok User_Connected')
- if upper(Gsk) ~= 'YES' then Gsk = ' '
- if upper(Gsk) = 'YES' then Gsk = 'ask'
- if upper(UseGeatz) = 'YES' & USRGT = 'Y' Then send MSG usr QU||Greatings||QU||' '||Gsk
- end
-
- return
- /* ------------------------------------------------------------ */
- Disconnecting:
- am = 0
- seen = checkuser()
- if seen = 1 then do
- sound = Player ||" "|| SoundfileD
- if upper(PlaySonud) = "YES" Then address command sound
- if upper(UseAmirc) = 'YES' then am = amirc('DisConnected')
- info = "_[User_Name]_-:_"||usr||NL||"_[Host]_-:_"||host
- if upper(ShowReqD) = 'YES' & am = 0 then r = req(info' ok User_Dissconected')
- end
- return
- /* ------------------------------------------------------------ */
- req:
- arg BodyText Buttons Title
- BodyText = translate(BodyText,,'_',' '); Buttons = translate(Buttons,,'_',' '); Title = translate(Title,,'_',' ')
- If upper(ReqType) = 'REQT' then sel=rtezrequest(BodyText,Buttons,Title,tags) */
- If upper(ReqType) = 'ACS' then do; BodyText = translate(BodyText,,NL,'0d'x); REQUESTA QU||Title||QU QU||Buttons||QU QU||BodyText||QU; sel = RC; End
- return sel
- /* ------------------------------------------------------------ */
- checkuser:
- x = 0
-
- do i = 0 to NumberOfUsers
- if upper(usr) = upper(user.i) then x = 1
- end
- if pos(Upper(usr),Upper(NoGreatzTo)) >0 then USRGT = 'N'
-
- return x
- /* ------------------------------------------------------------ */
- amirc:
- arg CD
-
- ports = show('P'); pz = 1; f = 0
-
- do until ppoz = 0
-
- ppoz = pos('AMIRC.',ports,pz)
- pz = ppoz + 1
- if ppoz ~= 0 then do
- hst = substr(ports,ppoz,'7')
- address value hst;
- 'isconnected'
- if RC = 0 then do
- 'echo P='d2c(27)'b«AmiComSys» User -: 'usr' Has 'CD
- 'echo P='d2c(27)'b«AmiComSys» Host -: 'host
- f = 1
- end
- end
- end
-
- ADDRESS AMICOMSYS
-
- return f
-